<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
        <meta name="description" content="TinyMapper is a quick object-object mapper for .NET">
        <meta name="keywords" content="object mapper C#, object mapper .net, mapper, object to object, object mapper">
        <meta name="msvalidate.01" content="E131468FC70A729451F8D412ECD7F5C0" />
        <title>TinyMapper</title>

        <!-- CSS  -->
        <link rel="icon" type="image/x-icon" href="favicon.ico" />
        <link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.2/normalize.min.css" type="text/css" rel="stylesheet" media="screen,projection"/>
        <link href="css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection"/>
        <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/7.5/styles/tomorrow.min.css">
    </head>
    <body>
        <nav class="white" role="navigation">
            <div class="nav-wrapper container">
                <a id="logo-container" href="#" class="brand-logo"><img src="images/logo.png"></img></a>
            <ul class="right hide-on-med-and-down">
                <li><a href="https://github.com/TinyMapper/TinyMapper">GitHub</a></li>
                <li><a href="https://www.nuget.org/packages/TinyMapper/">NuGet</a></li>
            </ul>
            <ul id="nav-mobile" class="side-nav">
                <li><a href="https://github.com/TinyMapper/TinyMapper">GitHub</a></li>
                <li><a href="https://www.nuget.org/packages/TinyMapper/">NuGet</a></li>
            </ul>
            <a href="#" data-activates="nav-mobile" class="button-collapse right brown-text"><i class="brown-text mdi-navigation-menu"></i></a>
            </div>
        </nav>
    <div id="index-banner" class="parallax-container">
        <div class="section no-pad-bot">
            <div class="container">
                <br><br>
                <h1 class="header center brown-text text-lighten-4">Tiny Mapper</h1>
                <div class="row center">
                    <h5 class="header col s12 light">The fastest object mapper for .NET</h5>
                </div>
                <div class="row center">
                    <a style="cursor: pointer;" onclick="scrollToAnchor('code-section')" id="example-button" class="btn-large waves-effect waves-light teal lighten-1">Get Started</a>
                    <a style="cursor: pointer;" onclick="scrollToAnchor('comparison')" id="example-button" class="btn-large waves-effect waves-light blue lighten-1">Performance</a>
                </div>
                <br><br>
            </div>
        </div>
        <div class="parallax"><img src="background1.jpg" alt="Unsplashed background img 2"></div>
    </div>
    <div class="container">
        <div class="section">

            <!--   Icon Section   -->
            <div class="row">
                <div class="col s12 m4">
                    <div class="icon-block">
                        <h2 class="center brown-text"><i class="mdi-image-flash-on"></i></h2>
                        <h5 class="center">Incredibly quick</h5>
                        <p class="light">Map thousands of objects in a jiffy.</p>
                        <p class="light">We have compared TinyMapper with AutoMapper.</p>
                        <a style="cursor: pointer;" onclick="scrollToAnchor('comparison')">see comparison results</a>
                    </div>
                </div>

                <div class="col s12 m4">
                    <div class="icon-block">
                        <h2 class="center brown-text"><i class="mdi-social-group"></i></h2>
                        <h5 class="center">User Friendly</h5>

                        <p class="light">Usage of TinyMapper is very straightforward. It was designed to be simple and effective. NuGet package allows simple and quick installation of library.</p>
                    </div>
                </div>

                <div class="col s12 m4">
                    <div class="icon-block">
                        <h2 class="center brown-text"><i class="mdi-action-settings"></i></h2>
                        <h5 class="center">Open Source</h5>

                        <p class="light">TinyMapper is an open-source project. This means that you can check out source code, fork it and participate in project.</p>
                    </div>
                </div>
            </div>

        </div>
    </div>


    <div class="parallax-container valign-wrapper">
        <div class="section no-pad-bot">
            <div class="container">
                <div class="row center">
                    <h4 class="header col s12 light">100 times quicker than the next leading product</h4>
                </div>
            </div>
        </div>
        <div class="parallax"><img src="background2.jpg" alt="Unsplashed background img 2"></div>
    </div>

    <div class="container">
        <div class="section">

            <div class="row center">
                <div class="center" id="comparison">
                    <h4><!--<i class="mdi-content-send brown-text"></i>-->Speed comparison results</h4>
                    <h5>(Lower is better)</h5>
                </div>
                <canvas id="myChart" width="800" height="400"></canvas>
            </div>

        </div>
    </div>

    <div class="parallax-container valign-wrapper">
        <div class="section no-pad-bot">
            <div class="container">
                <div class="row center">
                    <h5 class="header col s12 light">Don't spend your time doing useless tedious tasks. be<b>productive</b></h5>
                </div>
            </div>
        </div>
        <div class="parallax"><img src="background1.jpg" alt="Unsplashed background img 3"></div>
    </div>

    <div class="container">
        <div class="section">

            <div class="row">
                <div class="col s12">
                    <div id="code-section" class="center">
                        <h3><i class="mdi-content-send brown-text"></i></h3>
                        <h4>Code example</h4>
                    </div>
                    <pre>
                        <code id="code" class="cs">

                        </code>
                        </pre>
                    <p class="left-align light">For more information please check out our <a href="https://github.com/TinyMapper/TinyMapper/wiki">Wiki page</a>. If you have any questions regarding library usage and development you can ask them on the <a href="https://github.com/TinyMapper/TinyMapper/issues">issue page.</a></p>
                </div>
            </div>

        </div>
    </div>

    <footer class="page-footer brown darken-2">
        <div class="container">
            <div class="row">
                <div class="col l6 s12">
                    <h5 class="white-text">Part of Nelibur project</h5>
                    <p class="grey-text text-lighten-4">Check out our other products that help you create powerful solutions in a few moments</p>


                </div>
                <div class="col l3 s12">
                    <h5 class="white-text">Related projects</h5>
                    <ul>
                        <li><a class="white-text" href="https://github.com/Nelibur/Nelibur">Nelibur</a></li>
                        <li><a class="white-text" href="https://github.com/Nelibur/Nelibur">Nelibur.Sword</a></li>
                    </ul>
                </div>
                <div class="col l3 s12">
                    <h5 class="white-text">Links</h5>
                    <ul>
                        <li><a class="white-text" href="https://github.com/TinyMapper/TinyMapper">GitHub site</a></li>
                        <li><a class="white-text" href="https://www.nuget.org/packages/TinyMapper/">NuGet package</a></li>
                        <li><a class="white-text" href="https://github.com/TinyMapper/TinyMapper/wiki">Wiki</a></li>
                    </ul>
                </div>
            </div>
        </div>

    </footer>


    <!--  Scripts-->
    <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
    <script src="js/materialize.min.js"></script>
    <script src="js/init.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.1/Chart.min.js"></script>
    <script>


        /* jshint ignore:start */
        // Blows up jshint errors based on the new Function constructor
        //Templating methods
        //Javascript micro templating by John Resig - source at http://ejohn.org/blog/javascript-micro-templating/
        function template(templateString, valuesObject){

            // If templateString is function rather than string-template - call the function for valuesObject

            if(templateString instanceof Function){
                return templateString(valuesObject);
            }

            var cache = {};
            function tmpl(str, data){
                // Figure out if we're getting a template, or if we need to
                // load the template - and be sure to cache the result.
                var fn = !/\W/.test(str) ?
                    cache[str] = cache[str] :

                // Generate a reusable function that will serve as a template
                // generator (and which will be cached).
                new Function("obj",
                             "var p=[],print=function(){p.push.apply(p,arguments);};" +

                             // Introduce the data as local variables using with(){}
                             "with(obj){p.push('" +

                             // Convert the template into pure JavaScript
                             str
                             .replace(/[\r\t\n]/g, " ")
                             .split("<%").join("\t")
                             .replace(/((^|%>)[^\t]*)'/g, "$1\r")
                             .replace(/\t=(.*?)%>/g, "',$1,'")
                             .split("\t").join("');")
                             .split("%>").join("p.push('")
                             .split("\r").join("\\'") +
                             "');}return p.join('');"
                            );

                // Provide some basic currying to the user
                return data ? fn( data ) : fn;
            }
            return tmpl(templateString,valuesObject);
        };



        var data = {
            labels: ["Handwritten", "TinyMapper v2.0.5", "AutoMapper.NET v4.0.4"],
            datasets: [
                {
                    label: "Complex object mapping",
                    fillColor: "rgba(151,187,205,0.5)",
                    strokeColor: "rgba(151,187,205,0.8)",
                    highlightFill: "rgba(151,187,205,0.75)",
                    highlightStroke: "rgba(151,187,205,1)",
                    data: [21,81,4846]
                }
            ]
        };
        // Get context with jQuery - using jQuery's .get() method.
        var ctx = $("#myChart").get(0).getContext("2d");
        // This will get the first returned node in the jQuery collection.

        var options = {
            barShowStroke: false,
            responsive: true,
            scaleOverride : true,
            scaleSteps : 10,
            scaleStepWidth : 150,
            showTooltips : false,
            showInlineValues : true,
            centeredInllineValues : false,
            tooltipCaretSize : 0,
            tooltipTemplate : "<%= value %>",
            legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><div>Time in milliseconds</div><% for (var i=0; i<datasets.length; i++){%><li class=\"left\"><div style='margin: 0 5px;width:16px;height:16px;display:inline-block;background-color:<%=datasets[i].fillColor%>'></div><span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>",
            // Function - Will fire on animation completion.
            onAnimationComplete: function(){
                if (this.options.showInlineValues) {
                    if (this.name == "Bar") {
                        this.eachBars(function(bar){
                            var tooltipPosition = bar.tooltipPosition();
                            new Chart.Tooltip({
                                x: Math.round(tooltipPosition.x),
                                y: bar.height() > this.chart.height ? 10 : Math.round(this.chart.height - bar.height() - 25), //Math.round(this.chart.height - 30),
                                xPadding: this.options.tooltipXPadding,
                                yPadding: this.options.tooltipYPadding,
                                fillColor: this.options.tooltipFillColor,
                                textColor: this.options.tooltipFontColor,
                                fontFamily: this.options.tooltipFontFamily,
                                fontStyle: this.options.tooltipFontStyle,
                                fontSize: this.options.tooltipFontSize,
                                caretHeight: this.options.tooltipCaretSize,
                                cornerRadius: this.options.tooltipCornerRadius,
                                text: template(this.options.tooltipTemplate, bar) + " ms",
                                chart: this.chart
                            }).draw();
                        });
                    }
                }
            }
        };

        var chart = new Chart(ctx).Bar(data, options);

    </script>
    <script>
        function scrollToAnchor(anchor_id) {
            var tag = $("#"+anchor_id+"");
            $('html,body').animate({scrollTop: tag.offset().top},'slow');
        }    

        function loadCode(data)
        {
            $("#code").text(data);
            $('pre code').each(function(i, block) {
                hljs.highlightBlock(block);
            });
        }

        $(document).ready(function() {
            $.ajax({ url: 'code.cs', encoding:"UTF-8", success: loadCode });

        });



    </script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/7.5/highlight.min.js"></script>
    <script>
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
                                })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

        ga('create', 'UA-60620793-1', 'auto');
        ga('send', 'pageview');
    </script>
    <!-- Yandex.Metrika informer -->
<!--    <a href="https://metrika.yandex.ru/stat/?id=29216970&amp;from=informer"-->
<!--       target="_blank" rel="nofollow"><img src="//bs.yandex.ru/informer/29216970/3_1_FFFFFFFF_EFEFEFFF_0_pageviews"-->
<!--                                           style="width:88px; height:31px; border:0;" alt="Яндекс.Метрика" title="Яндекс.Метрика: данные за сегодня (просмотры, визиты и уникальные посетители)" onclick="try{Ya.Metrika.informer({i:this,id:29216970,lang:'ru'});return false}catch(e){}"/></a>-->
    <!-- /Yandex.Metrika informer -->

    <!-- Yandex.Metrika counter -->
    <script type="text/javascript">
        (function (d, w, c) {
            (w[c] = w[c] || []).push(function() {
                try {
                    w.yaCounter29216970 = new Ya.Metrika({id:29216970,
                                                          webvisor:true,
                                                          clickmap:true,
                                                          trackLinks:true,
                                                          accurateTrackBounce:true});
                } catch(e) { }
            });

            var n = d.getElementsByTagName("script")[0],
                s = d.createElement("script"),
                f = function () { n.parentNode.insertBefore(s, n); };
            s.type = "text/javascript";
            s.async = true;
            s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";

            if (w.opera == "[object Opera]") {
                d.addEventListener("DOMContentLoaded", f, false);
            } else { f(); }
        })(document, window, "yandex_metrika_callbacks");
    </script>
    <noscript><div><img src="//mc.yandex.ru/watch/29216970" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
    <!-- /Yandex.Metrika counter -->
    </body>
</html>
